using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using FarPoint.Win.Spread;

namespace Spread.Sparkline.Features
{
    public partial class BulletSparkline : Spread.Common.Features.Sample.BaseSampleControl
    {
        public BulletSparkline()
        {
            InitializeComponent();
            Name = "Bullet";

            InitSparklineSettings();
            InitSpread();
        }

        #region Private methods
        private void InitSparklineSettings()
        {
            List<Color> colors = new List<Color>
            {
                Color.White,
                Color.Black,
                Color.Orange,
                Color.LightGray,
                Color.Gray,
                Color.DarkGray,
                Color.Green
            };

            comboColorScheme.DataSource = colors;
            comboMeasureColor.DataSource = colors.ToList();
            comboTargetColor.DataSource = colors.ToList();
            comboMaxColor.DataSource = colors.ToList();
            comboOptimistColor.DataSource = colors.ToList();
            comboPessimistColor.DataSource = colors.ToList();
            comboForecastColor.DataSource = colors.ToList();

            comboColorScheme.SelectedItem = Color.White;
            comboMeasureColor.SelectedItem = Color.Black;
            comboTargetColor.SelectedItem = Color.Orange;
            comboMaxColor.SelectedItem = Color.LightGray;
            comboOptimistColor.SelectedItem = Color.Gray;
            comboPessimistColor.SelectedItem = Color.DarkGray;
            comboForecastColor.SelectedItem = Color.White;

            chkMeasureOverMax.Checked = true;
            numericBarSize.Value = 0.7M;

            comboColorScheme.SelectedIndexChanged += OnSparklineSettingsChanged;
            comboMeasureColor.SelectedIndexChanged += OnSparklineSettingsChanged;
            comboTargetColor.SelectedIndexChanged += OnSparklineSettingsChanged;
            comboMaxColor.SelectedIndexChanged += OnSparklineSettingsChanged;
            comboOptimistColor.SelectedIndexChanged += OnSparklineSettingsChanged;
            comboPessimistColor.SelectedIndexChanged += OnSparklineSettingsChanged;
            comboForecastColor.SelectedIndexChanged += OnSparklineSettingsChanged;
            chkMeasureOverMax.CheckedChanged += OnSparklineSettingsChanged;
            numericBarSize.ValueChanged += OnSparklineSettingsChanged;
        }

        private void InitSpread()
        {
            fpSpread1.Sheets.Count = 2;
            fpSpread1.TabStripInsertTab = false;

            InitHorizontalSparkline(fpSpread1.Sheets[0], "Horizontal");
            InitVerticalSparkline(fpSpread1.Sheets[1], "Vertical");
        }

        private void InitHorizontalSparkline(SheetView sheetView, string name)
        {
            var worksheet = sheetView.AsWorksheet();
            worksheet.Name = name;

            worksheet.Cells["B2:I2"].Merge();
            worksheet.Cells["B2"].Value = "Revenue By Region (million $)";
            worksheet.Cells["B2"].Font.ApplyFont(new GrapeCity.Spreadsheet.Font() { Name = "Calibri", Size = 16 });
            worksheet.Cells["B2"].HorizontalAlignment = GrapeCity.Spreadsheet.HorizontalAlignment.Center;
            worksheet.Cells["B2"].VerticalAlignment = GrapeCity.Spreadsheet.VerticalAlignment.Center;
            sheetView.Cells["B2"].ForeColor = Color.White;
            sheetView.Cells["B2"].BackColor = ColorTranslator.FromHtml("#82bc00");

            worksheet.Cells["B3:I9"].VerticalAlignment = GrapeCity.Spreadsheet.VerticalAlignment.Center;
            worksheet.Cells["B3:I9"].Font.ApplyFont(new GrapeCity.Spreadsheet.Font() { Name = "Calibri", Size = 12, Bold = true });
            sheetView.Cells["B3:I9"].BackColor = ColorTranslator.FromHtml("#F4F8EB");

            worksheet.Cells["B4:H9"].Font.ApplyFont(new GrapeCity.Spreadsheet.Font() { Name = sheetView.FpSpread.Font.Name, Size = 12});
            worksheet.Cells["B4:H9"].VerticalAlignment = GrapeCity.Spreadsheet.VerticalAlignment.Center;

            worksheet.Cells["B3:I9"].Borders.LineStyle = GrapeCity.Spreadsheet.BorderLineStyle.Thin;
            worksheet.Cells["B3:I9"].Borders.Color = GrapeCity.Spreadsheet.Color.FromArgb(Color.Black.ToArgb());

            worksheet.Cells["B4:I9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideHorizontal].LineStyle = GrapeCity.Spreadsheet.BorderLineStyle.Dotted;
            worksheet.Cells["B4:I9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideHorizontal].Color = GrapeCity.Spreadsheet.Color.FromArgb(Color.Black.ToArgb());
            worksheet.Cells["B4:I9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideVertical].LineStyle = GrapeCity.Spreadsheet.BorderLineStyle.Dotted;
            worksheet.Cells["B4:I9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideVertical].Color = GrapeCity.Spreadsheet.Color.FromArgb(Color.Black.ToArgb());

            worksheet.SetValue(2, 1, new object[,]
            {
                { "Region", "Forecast", "Actual", "Target", "Max", "Optimist F.", "Pessimist F."},
                { "North America", 80, 75, 70, 95, 65, 50 },
                { "South America", 79, 62, 80, 95, 75, 50 },
                { "Europe", 95, 100, 100, 120, 90, 80 },
                { "Asia", 80, 95, 80, 90, 70, 55 },
                { "Australia", 35, 20, 40, 50, 35, 15 },
                { "Africa", 34, 40, 30, 50, 20, 15 }
            });

            for (int i = 3; i < 9; i++)
            {
                UpdateSparkline(worksheet, i, 8, SparklineOrientation.Horizontal);
            }

            worksheet.Rows["2"].RowHeight = 30;
            worksheet.Rows["4:9"].RowHeight = 40;

            worksheet.Columns["B:H"].ColumnWidth = 100;
            worksheet.Columns["I"].ColumnWidth = 250;
        }

        private void InitVerticalSparkline(SheetView sheetView, string name)
        {
            var worksheet = sheetView.AsWorksheet();
            worksheet.Name = name;

            worksheet.Cells["B2:H2"].Merge();
            worksheet.Cells["B2"].Value = "Revenue By Region (million $)";
            worksheet.Cells["B2"].Font.ApplyFont(new GrapeCity.Spreadsheet.Font() { Name = "Calibri", Size = 16 });
            worksheet.Cells["B2"].HorizontalAlignment = GrapeCity.Spreadsheet.HorizontalAlignment.Center;
            worksheet.Cells["B2"].VerticalAlignment = GrapeCity.Spreadsheet.VerticalAlignment.Center;
            sheetView.Cells["B2"].ForeColor = Color.White;
            sheetView.Cells["B2"].BackColor = ColorTranslator.FromHtml("#82bc00");

            worksheet.Cells["B3:B9"].VerticalAlignment = GrapeCity.Spreadsheet.VerticalAlignment.Center;
            worksheet.Cells["B3:B9"].Font.ApplyFont(new GrapeCity.Spreadsheet.Font() { Name = "Calibri", Size = 12, Bold = true });
            sheetView.Cells["B3:B9"].BackColor = ColorTranslator.FromHtml("#F4F8EB");

            worksheet.Cells["C3:H9"].Font.ApplyFont(new GrapeCity.Spreadsheet.Font() { Name = sheetView.FpSpread.Font.Name, Size = 12 });
            worksheet.Cells["C3:H9"].VerticalAlignment = GrapeCity.Spreadsheet.VerticalAlignment.Center;

            worksheet.Cells["B3:H9"].Borders.LineStyle = GrapeCity.Spreadsheet.BorderLineStyle.Thin;
            worksheet.Cells["B3:H9"].Borders.Color = GrapeCity.Spreadsheet.Color.FromArgb(Color.Black.ToArgb());

            worksheet.Cells["C3:H9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideHorizontal].LineStyle = GrapeCity.Spreadsheet.BorderLineStyle.Dotted;
            worksheet.Cells["C3:H9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideHorizontal].Color = GrapeCity.Spreadsheet.Color.FromArgb(Color.Black.ToArgb());
            worksheet.Cells["C3:H9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideVertical].LineStyle = GrapeCity.Spreadsheet.BorderLineStyle.Dotted;
            worksheet.Cells["C3:H9"].Borders[GrapeCity.Spreadsheet.BordersIndex.InsideVertical].Color = GrapeCity.Spreadsheet.Color.FromArgb(Color.Black.ToArgb());

            worksheet.SetValue(2, 1, new object[,]
            {
                { "Region", "North America", "South America", "Europe", "Asia", "Australia", "Africa" },
                { "Forecast", 80, 79, 95, 80, 35, 34 },
                { "Actual", 75, 62, 100, 95, 20, 40 },
                { "Target", 70, 80, 100, 80, 40, 30 },
                { "Max", 95, 95, 120, 90, 50, 50 },
                { "Optimist F.", 65, 75, 90, 70, 35, 20 },
                { "Pessimist F.", 50, 50, 80, 55, 15, 15 }
            });

            for (int i = 2; i < 8; i++)
            {
                UpdateSparkline(worksheet, 9, i, SparklineOrientation.Vertical);
            }

            worksheet.Rows["2"].RowHeight = 30;
            worksheet.Rows["10"].RowHeight = 200;

            worksheet.Columns["B:H"].ColumnWidth = 100;
        }

        private void UpdateSparkline(GrapeCity.Spreadsheet.IWorksheet worksheet, int row, int col, SparklineOrientation orientation)
        {
            Color colorScheme = (Color)comboColorScheme.SelectedItem;
            Color measureColor = (Color)comboMeasureColor.SelectedItem;
            Color targetColor = (Color)comboTargetColor.SelectedItem;
            Color maxColor = (Color)comboMaxColor.SelectedItem;
            Color goodColor = (Color)comboOptimistColor.SelectedItem;
            Color badColor = (Color)comboPessimistColor.SelectedItem;
            Color forecastColor = (Color)comboForecastColor.SelectedItem;

            char colName = (char)('A' + col);
            if (orientation == SparklineOrientation.Horizontal)
            {
                worksheet.Cells[$"{colName}{row + 1}"].Formula2 = $"BULLETSPARKLINE($D{row + 1}, $E{row + 1}, $F{row + 1}, $G{row + 1}, $H{row + 1}," +
                    $"$C{row + 1}, 1, \"{colorScheme.Name}\", false, \"{measureColor.Name}\", \"{targetColor.Name}\", \"{maxColor.Name}\", \"{goodColor.Name}\"," +
                    $"\"{badColor.Name}\", \"{forecastColor.Name}\", {chkMeasureOverMax.Checked}, {numericBarSize.Value})";
            }
            else
            {
                worksheet.Cells[$"{colName}{row + 1}"].Formula2 = $"BULLETSPARKLINE(${colName}5, ${colName}6, ${colName}7, ${colName}8, ${colName}9," +
                    $"${colName}4, 1, \"{colorScheme.Name}\", true, \"{measureColor.Name}\", \"{targetColor.Name}\", \"{maxColor.Name}\", \"{goodColor.Name}\"," +
                    $"\"{badColor.Name}\", \"{forecastColor.Name}\", {chkMeasureOverMax.Checked}, {numericBarSize.Value})";
            }
        }
        #endregion

        #region Event handlers
        private void OnSparklineSettingsChanged(object sender, EventArgs e)
        {
            if (fpSpread1.ActiveSheetIndex == 0)
            {
                for (int row = 3; row < 9; row++)
                {
                    UpdateSparkline(fpSpread1.ActiveSheet.AsWorksheet(), row, 8, SparklineOrientation.Horizontal);
                }
            }
            else if (fpSpread1.ActiveSheetIndex == 1)
            {
                for (int col = 2; col < 8; col++)
                {
                    UpdateSparkline(fpSpread1.ActiveSheet.AsWorksheet(), 9, col, SparklineOrientation.Vertical);
                }
            }
        }
        #endregion

        enum SparklineOrientation
        {
            Horizontal,
            Vertical
        }
    }
}


//
//BulletSparkline.Designer.cs
//


namespace Spread.Sparkline.Features
{
    partial class BulletSparkline
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BulletSparkline));
            this.fpSpread1 = new FarPoint.Win.Spread.FpSpread(FarPoint.Win.Spread.LegacyBehaviors.None, ((object)(resources.GetObject("pnlMain.Controls"))));
            this.fpSpread1_Sheet1 = this.fpSpread1.GetSheet(0);
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.numericBarSize = new System.Windows.Forms.NumericUpDown();
            this.label8 = new System.Windows.Forms.Label();
            this.chkMeasureOverMax = new System.Windows.Forms.CheckBox();
            this.comboForecastColor = new System.Windows.Forms.ComboBox();
            this.label7 = new System.Windows.Forms.Label();
            this.comboPessimistColor = new System.Windows.Forms.ComboBox();
            this.label6 = new System.Windows.Forms.Label();
            this.comboOptimistColor = new System.Windows.Forms.ComboBox();
            this.label5 = new System.Windows.Forms.Label();
            this.comboMaxColor = new System.Windows.Forms.ComboBox();
            this.label4 = new System.Windows.Forms.Label();
            this.comboTargetColor = new System.Windows.Forms.ComboBox();
            this.label3 = new System.Windows.Forms.Label();
            this.comboMeasureColor = new System.Windows.Forms.ComboBox();
            this.label2 = new System.Windows.Forms.Label();
            this.comboColorScheme = new System.Windows.Forms.ComboBox();
            this.label1 = new System.Windows.Forms.Label();
            this.pnlMain.SuspendLayout();
            this.pnlControls.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numericBarSize)).BeginInit();
            this.SuspendLayout();
            // 
            // pnlMain
            // 
            this.pnlMain.Controls.Add(this.fpSpread1);
            this.pnlMain.Margin = new System.Windows.Forms.Padding(2);
            this.pnlMain.Size = new System.Drawing.Size(519, 487);
            // 
            // pnlControls
            // 
            this.pnlControls.Controls.Add(this.groupBox1);
            this.pnlControls.Margin = new System.Windows.Forms.Padding(2);
            this.pnlControls.Size = new System.Drawing.Size(171, 487);
            // 
            // fpSpread1
            // 
            this.fpSpread1.AccessibleDescription = "Book1, Sheet1, Row 0, Column 0";
            this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.fpSpread1.Font = new System.Drawing.Font("Calibri", 11F);
            this.fpSpread1.Location = new System.Drawing.Point(0, 0);
            this.fpSpread1.Margin = new System.Windows.Forms.Padding(2);
            this.fpSpread1.Name = "fpSpread1";
            this.fpSpread1.Size = new System.Drawing.Size(519, 487);
            this.fpSpread1.TabIndex = 1;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.numericBarSize);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.Controls.Add(this.chkMeasureOverMax);
            this.groupBox1.Controls.Add(this.comboForecastColor);
            this.groupBox1.Controls.Add(this.label7);
            this.groupBox1.Controls.Add(this.comboPessimistColor);
            this.groupBox1.Controls.Add(this.label6);
            this.groupBox1.Controls.Add(this.comboOptimistColor);
            this.groupBox1.Controls.Add(this.label5);
            this.groupBox1.Controls.Add(this.comboMaxColor);
            this.groupBox1.Controls.Add(this.label4);
            this.groupBox1.Controls.Add(this.comboTargetColor);
            this.groupBox1.Controls.Add(this.label3);
            this.groupBox1.Controls.Add(this.comboMeasureColor);
            this.groupBox1.Controls.Add(this.label2);
            this.groupBox1.Controls.Add(this.comboColorScheme);
            this.groupBox1.Controls.Add(this.label1);
            this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
            this.groupBox1.Location = new System.Drawing.Point(0, 0);
            this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
            this.groupBox1.Size = new System.Drawing.Size(171, 301);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Settings";
            // 
            // numericBarSize
            // 
            this.numericBarSize.DecimalPlaces = 2;
            this.numericBarSize.Increment = new decimal(new int[] {
            5,
            0,
            0,
            131072});
            this.numericBarSize.Location = new System.Drawing.Point(60, 268);
            this.numericBarSize.Margin = new System.Windows.Forms.Padding(2);
            this.numericBarSize.Maximum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.numericBarSize.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            131072});
            this.numericBarSize.Name = "numericBarSize";
            this.numericBarSize.Size = new System.Drawing.Size(69, 20);
            this.numericBarSize.TabIndex = 16;
            this.numericBarSize.Value = new decimal(new int[] {
            5,
            0,
            0,
            131072});
            // 
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(7, 270);
            this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(49, 13);
            this.label8.TabIndex = 15;
            this.label8.Text = "Bar Size:";
            // 
            // chkMeasureOverMax
            // 
            this.chkMeasureOverMax.AutoSize = true;
            this.chkMeasureOverMax.Location = new System.Drawing.Point(9, 236);
            this.chkMeasureOverMax.Margin = new System.Windows.Forms.Padding(2);
            this.chkMeasureOverMax.Name = "chkMeasureOverMax";
            this.chkMeasureOverMax.Size = new System.Drawing.Size(144, 17);
            this.chkMeasureOverMax.TabIndex = 14;
            this.chkMeasureOverMax.Text = "Allow Measure Over Max";
            this.chkMeasureOverMax.UseVisualStyleBackColor = true;
            // 
            // comboForecastColor
            // 
            this.comboForecastColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboForecastColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboForecastColor.FormattingEnabled = true;
            this.comboForecastColor.Location = new System.Drawing.Point(105, 203);
            this.comboForecastColor.Margin = new System.Windows.Forms.Padding(2);
            this.comboForecastColor.Name = "comboForecastColor";
            this.comboForecastColor.Size = new System.Drawing.Size(62, 21);
            this.comboForecastColor.TabIndex = 13;
            // 
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(7, 206);
            this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(78, 13);
            this.label7.TabIndex = 12;
            this.label7.Text = "Forecast Color:";
            // 
            // comboPessimistColor
            // 
            this.comboPessimistColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboPessimistColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboPessimistColor.FormattingEnabled = true;
            this.comboPessimistColor.Location = new System.Drawing.Point(105, 173);
            this.comboPessimistColor.Margin = new System.Windows.Forms.Padding(2);
            this.comboPessimistColor.Name = "comboPessimistColor";
            this.comboPessimistColor.Size = new System.Drawing.Size(62, 21);
            this.comboPessimistColor.TabIndex = 11;
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(7, 176);
            this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(80, 13);
            this.label6.TabIndex = 10;
            this.label6.Text = "Pessimist Color:";
            // 
            // comboOptimistColor
            // 
            this.comboOptimistColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboOptimistColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboOptimistColor.FormattingEnabled = true;
            this.comboOptimistColor.Location = new System.Drawing.Point(105, 143);
            this.comboOptimistColor.Margin = new System.Windows.Forms.Padding(2);
            this.comboOptimistColor.Name = "comboOptimistColor";
            this.comboOptimistColor.Size = new System.Drawing.Size(62, 21);
            this.comboOptimistColor.TabIndex = 9;
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(7, 146);
            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(74, 13);
            this.label5.TabIndex = 8;
            this.label5.Text = "Optimist Color:";
            // 
            // comboMaxColor
            // 
            this.comboMaxColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboMaxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboMaxColor.FormattingEnabled = true;
            this.comboMaxColor.Location = new System.Drawing.Point(105, 113);
            this.comboMaxColor.Margin = new System.Windows.Forms.Padding(2);
            this.comboMaxColor.Name = "comboMaxColor";
            this.comboMaxColor.Size = new System.Drawing.Size(62, 21);
            this.comboMaxColor.TabIndex = 7;
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(7, 116);
            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(81, 13);
            this.label4.TabIndex = 6;
            this.label4.Text = "Maximum Color:";
            // 
            // comboTargetColor
            // 
            this.comboTargetColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboTargetColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboTargetColor.FormattingEnabled = true;
            this.comboTargetColor.Location = new System.Drawing.Point(105, 83);
            this.comboTargetColor.Margin = new System.Windows.Forms.Padding(2);
            this.comboTargetColor.Name = "comboTargetColor";
            this.comboTargetColor.Size = new System.Drawing.Size(62, 21);
            this.comboTargetColor.TabIndex = 5;
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(7, 86);
            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(68, 13);
            this.label3.TabIndex = 4;
            this.label3.Text = "Target Color:";
            // 
            // comboMeasureColor
            // 
            this.comboMeasureColor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboMeasureColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboMeasureColor.FormattingEnabled = true;
            this.comboMeasureColor.Location = new System.Drawing.Point(105, 53);
            this.comboMeasureColor.Margin = new System.Windows.Forms.Padding(2);
            this.comboMeasureColor.Name = "comboMeasureColor";
            this.comboMeasureColor.Size = new System.Drawing.Size(62, 21);
            this.comboMeasureColor.TabIndex = 3;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(7, 56);
            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(78, 13);
            this.label2.TabIndex = 2;
            this.label2.Text = "Measure Color:";
            // 
            // comboColorScheme
            // 
            this.comboColorScheme.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.comboColorScheme.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboColorScheme.FormattingEnabled = true;
            this.comboColorScheme.Location = new System.Drawing.Point(105, 23);
            this.comboColorScheme.Margin = new System.Windows.Forms.Padding(2);
            this.comboColorScheme.Name = "comboColorScheme";
            this.comboColorScheme.Size = new System.Drawing.Size(62, 21);
            this.comboColorScheme.TabIndex = 1;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(7, 26);
            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(76, 13);
            this.label1.TabIndex = 0;
            this.label1.Text = "Color Scheme:";
            // 
            // BulletSparkline
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Margin = new System.Windows.Forms.Padding(2);
            this.Name = "BulletSparkline";
            this.Size = new System.Drawing.Size(691, 487);
            this.pnlMain.ResumeLayout(false);
            this.pnlControls.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.numericBarSize)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion
        private FarPoint.Win.Spread.FpSpread fpSpread1;
        private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.NumericUpDown numericBarSize;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.CheckBox chkMeasureOverMax;
        private System.Windows.Forms.ComboBox comboForecastColor;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.ComboBox comboPessimistColor;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.ComboBox comboOptimistColor;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.ComboBox comboMaxColor;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.ComboBox comboTargetColor;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.ComboBox comboMeasureColor;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.ComboBox comboColorScheme;
        private System.Windows.Forms.Label label1;
    }
}
